const mutations={
    //左边导航栏列表
    SET_MENU(state:any, menu:Array<any>) {
        state.sidebarMenu = menu
    },
    /* 完整的路由表 */
    SET_PERMISSION(state:any, routes:Array<any>) {
        state.permissionList = routes
    },
    //当前选中的导航
    SET_CURRENT_MENU(state:any, currentMenu:string) {
        state.currentMenu = currentMenu
    },
    //导航栏是否折叠
    toggleNavCollapse(state:any) {
        state.isSidebarNavCollapse = !state.isSidebarNavCollapse
    },
    /* 面包屑导航列表 */
    setCrumbList(state:any, list:Array<any>) {
        state.crumbList = list
    },
    SET_TOKEN(state:any,token:any){
                    state.token = token;
                    localStorage.setItem("token",token) },
    SET_USERINFO(state:any,userInfo:any){
                    state.userInfo = userInfo;
                    localStorage.setItem("userInfo", JSON.stringify(userInfo))},
    REMOVE_INFO:(state:any)=>{
                    state.token = ''
                    state.userInfo = {};
                    localStorage.setItem("token",'') 
                    localStorage.setItem("userInfo",JSON.stringify(''))},
    SET_PERMISSIONLIST:(state:any,permissionlist:Array<any>)=>{
                    state.permission = permissionlist;
                    localStorage.setItem("permissionlist", JSON.stringify(permissionlist))},
            
    SET_BTNPRE:(state:any,btnPre:Array<any>)=>{
         state.btnPre = btnPre;
         localStorage.setItem("btnPre", JSON.stringify(btnPre))},
            
           } 
export default mutations